<!DOCTYPE HTML>
<html xmlns="http://www.w3.org/1999/xhtml"   xmlns:og="http://ogp.me/ns#"   xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
	<BASE href="<?= HOME; ?>" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="keywords" content="<?php if($data[keyword]=="") { echo KEYWORD;}else{echo2($data[keyword]);} ?>" />	
	<meta name="description" content="<?php if($data[mota]=="") { echo DES;}else{echo2($data[mota]);} ?>" /> 
	<title><?php if($data[title]=="") { echo HEAD;}else{echo2($data[title]);} ?></title>
 	<link rel="icon"  type="image/png" href="/favicon.png" />
  	<?php if($data['og']){ echo $data['og'];}?>
	<link href="<?= HOME ?>public/bootstrap/css/bootstrap.css" rel="stylesheet">
	<link href="<?= HOME ?>public/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css" />
    <link href="<?= HOME ?>public/exts/css/theme.css" rel="stylesheet" />
	<link href="<?= HOME ?>public/exts/css/general.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="<?= HOME ?>public/exts/css/select2.css" type="text/css" />	
	<link href="<?= HOME ?>public/exts/css/bootflat-extensions.css" rel="stylesheet" />
    <link href="<?= HOME ?>public/exts/slider2/jquery.nouislider.min.css" rel="stylesheet" type="text/css" />
    <?php if($_SESSION['mobile']!=0){?>
     <link rel='stylesheet' href='public/exts/nav/css/icomoon.css' type='text/css' media='all'>
     <link rel='stylesheet' href='public/exts/nav/css/jquery.mCustomScrollbar.css' type='text/css' media='all'>
    <link rel='stylesheet' href='public/exts/nav/css/orange.css' type='text/css' media='screen'><?php }?>

	<!-- CSS to style the file input field as button and adjust the Bootstrap progress bars -->
	<script type="text/javascript" language="javascript" src="<?= HOME ?>public/exts/js/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" language="javascript" src="<?= HOME ?>public/exts/js/lazy.js"></script>
    <script type="text/javascript" language="javascript" src="<?= HOME ?>public/exts/slider2/jquery.nouislider.min.js"></script> 
    <script type="text/javascript">var baseUrl = '<?= HOME; ?>';</script>
 <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed&subset=vietnamese' rel='stylesheet' type='text/css'>
   
            	<div id="fb-root"></div>
	<script type="text/javascript">
  // prevent jQuery from appending cache busting string to the end of the FeatureLoader URL 
  var cache = jQuery.ajaxSettings.cache; 
  jQuery.ajaxSettings.cache = true;
  // Load FeatureLoader asynchronously. Once loaded, we execute Facebook init 
  
  jQuery.getScript('http://connect.facebook.net/vi_VN/all.js', function() {      
    FB.init({appId: '<?php echo FB_ID ?>', status: true, cookie: true, xfbml: true});    
  });
  // just Restore jQuery caching setting
  jQuery.ajaxSettings.cache = cache;
</script>
</head>
<body style="padding-top:50px">

	<div id="wrapAll">
    
   <?php if($_SESSION['mobile']==0){ ?> 
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
					<!-- Brand and toggle get grouped for better mobile display -->
					<div class="navbar-header ">
						<button type="button" class="navbar-toggle navbar-left" data-toggle="collapse" data-target=".navbar-ex1-collapse">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						<a class="navbar-brand" href="<?php echo HOME ?>">
						<!--	<img src="<?php echo HOME; ?>public/images/logo.png" height="45px" /> -->
                       <i class="fa fa-home"></i> Mộng.VN
						</a>
						
                     	
					</div><!-- end .navbar-header -->
				<!-- Collect the nav links, forms, and other content for toggling -->
					
					<div class="collapse navbar-collapse navbar-ex1-collapse yamm">
               	<ul class="nav navbar-nav">
            				  <li><a href="<?php echo HOME."truyen" ?>"> <i class="fa fa-archive"></i> Kho Truyện</a></li>
                               <li><a href="<?php echo url() ?>#" class="show_story_history"> <i class="fa fa-bookmark"></i> Lịch Sử Đọc Truyện <span class="badge"><?php echo count($_COOKIE['tc']); ?></span></a></li>
                              <li><a href="<?php echo HOME."video" ?>"><i class="fa fa-video-camera"> </i> Video </a></li>
                              <li><a href="<?php echo HOME."blog" ?>"><i class="fa fa-book"></i> Blog</a></li>
                   			  <li><a href="<?php echo HOME."blog" ?>"><i class="fa fa-facebook-square"> </i> Facebook</a></li>
                              <li><a href="http://mong.vn/blog/playlist/13.html"><i class="fa fa-asterisk"></i> Hướng Dẫn</a></li>
                               
						</ul>
	<ul class="nav navbar-nav navbar-right">
               <?php
					if($_SESSION['user']['level']==1 || $_SESSION['level']==2|| $_SESSION['level']==3){
					static_admin();
					}?>
         
                       <li class="upload_mn"><a href="<?PHP echo  UPLOAD ?>" ><i  class="fa fa-cloud-upload"></i> UPLOAD</a></li>
                   <?php if(!isset($_SESSION['user'])){ ?>
	      					<li class="dropdown">
	        					<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i> User
                                 <b class="caret"></b></a>
        						<ul class="dropdown-menu">
         							<li></li>
							        <li><a href="<?php echo LOGIN ?>">Đăng Nhập bằng Facebook</a></li>
							</ul>
	      					</li>
                            <?php }else{ // ISSET SESSION USER ---
							?>
                            <li class="dropdown">
	        					<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i>
                                 <?php echo show_username($_SESSION['user']['username'],$_SESSION['user']['name']);?>
                                 <b class="caret"></b></a>
        						<ul class="dropdown-menu">
         							<li role="presentation" class="dropdown-header">Tài Khoản</li>
							        <li><a href="<?php echo USER_INFO;?>">Thông Tin</a></li>
                                    <li><a href="<?php echo USER_CHANGEPASSWORD; ?>">Thay đổi mật khẩu</a></li>
                                      <li><a href="<?php echo HOME;?>index.php?module=user&act=truyen&type=history">Theo Dõi Truyện</a></li>
                                    
                                    <li role="presentation" class="divider"></li>
                                    <?php if($_SESSION['user']['upload']==1){ ?>
                                    <li role="presentation" class="dropdown-header">Quản Lý Nội Dung</li>
                                    <li><a href="<?php echo HOME ?>index.php?module=user&act=truyen&type=truyen">Truyện</a></li>
                                    <li><a href="<?php echo HOME ?>index.php?module=user&act=post&type=text">Blog</a></li>
                                    <li><a href="<?php echo HOME ?>index.php?module=user&act=post&type=video">Video</a></li>
                                    <li role="presentation" class="divider"></li>
                                    <?php }else{?>
                                     <li><a href="http://mong.vn/blog/Dang-Ky-up-bai-tai-Mongvn/326.html">Đăng Ký Upload</a></li>
                                    <li role="presentation" class="divider"></li>
                                    <?php } ?>
							        <li><a href="<?php echo LOGOUT ?>"><span class="glyphicon glyphicon-log-out"></span> Thoát</a></li>
							    
       							</ul>
	      					</li>
                            <?php } ?>
	    				</ul>
                      

	  				</div><!-- /.navbar-collapse -->
				</nav>
				

				<div class="row" style=" margin:auto;margin-bottom: 20px; padding: 10px; max-width:1100px">
                            <div class="col-md-3 col-xs-6" >
                                <div id="logo">
                                
                                    <a href="<?php echo HOME; ?>"><img src="public/images/logo2.png" class="img-responsive"  alt="mong.vn logo" style="max-width:200px" /></a>
                                </div>
                            </div>
                            <div class="col-md-8 col-xs-6">
                            <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Mong.vn -->
<ins class="adsbygoogle"
     style="display:inline-block;width:728px;height:90px"
     data-ad-client="ca-pub-6643486112344004"
     data-ad-slot="3158471272"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

                            </div>
                </div>

				
                <?php
					//$_session mobile ==0
				 }else {?>
					<!-- START MENU -->
	<header class="css3aw-theme-dark">

		<div id="css3aw-main-menu-wrapper">
			<div id="css3aw-menu-trigger-icon">
				<span class="css3aw-menu-dash"></span>
				<span class="css3aw-menu-dash"></span>
				<span class="css3aw-menu-dash"></span>
			</div>
			
			<div id="css3aw-main-menu-container">
				<ul id="css3aw-menu">
					<li><a href="<?php echo HOME ?>"><span aria-hidden="true" class="icon-home"></span>HOME</a></li>
					<li class="css3aw-has-submenu"><a href="<?php echo url(); ?>#"><span aria-hidden="true" class="icon-book"></span>Truyện</a>
						<ul>
							  <?php echo get_list_theloai_truyen_mobi(); ?>
						</ul>
					</li>
                    <li><a class="show_story_history"><span aria-hidden="true" class="icon-stack"></span>Lịch Sử Đọc Truyện <span class="badge"><?php echo count($_COOKIE['tc']); ?></span></a></li>
					<li class="css3aw-has-submenu"><a href="<?php echo url(); ?>#"><span aria-hidden="true" class="icon-film"></span>Video - Music</a>
						<ul>
							
						 <?php echo	get_list_category_video_mobi();?>
						</ul>
					</li>
					<li class="css3aw-has-submenu"><a href="<?php echo url(); ?>#"><span aria-hidden="true" class="icon-file"></span>Blog</a>
						<ul>
							<?php echo get_list_category_blog_mobi();?>
						</ul>
					</li>
				
				</ul>
			</div>

		</div>
		
		<h3 style="font-family:Arial, Helvetica, sans-serif; font-size:14px">
        <?php if(isset($_GET['module']) && $_GET['module']=='truyen'){?>
        <a href="<?php echo HOME.'truyen' ?>">Kho Truyện</a>&nbsp;&nbsp;  | &nbsp;&nbsp; <a href="<?php echo url() ?>#category">Thể Loại</a>
		<?php }else
		 if(isset($_GET['module']) && $_GET['module']=='news' && $_GET['type']=='blog'){?>
        <a href="<?php echo HOME.'blog' ?>"> BLOG</a>
		<?php }else
		 if(isset($_GET['module']) && $_GET['module']=='news' && $_GET['type']=='video'){?>
        <a href="<?php echo HOME.'video' ?>"> Video - Music</a>
		<?php }else
		 		     {    ?>
     <a href="<?php echo HOME ?>"><i class="fa fa-home"></i> MONG.VN</a>
		<?php }?>
        </h3>	
	<?php /*
		<div id="css3aw-social-menu-wrapper">
			<span aria-hidden="true" class="icon-share"></span>
			<ul id="css3aw-social-menu">
           		 <li><a href="#"><span aria-hidden="true" class="icon-book"></span> </a></li>
				<li><a href="#"><span aria-hidden="true" class="icon-film"></span> </a></li>
				<li><a href="#"><span aria-hidden="true" class="icon-file"></span> </a></li>
                <li><a href="#"><span aria-hidden="true" class="icon-facebook"></span></a></li>
				<li><a href="#"><span aria-hidden="true" class="icon-google-plus"></span></a></li>
				<li><a href="#"><span aria-hidden="true" class="icon-youtube"></span></a></li>
				
			</ul>
		</div>
		*/ ?>
		

	</header>
					<!-- End of Menu -->

        <div style="height:5px"></div>
                
               <?php 
			    if(isset($_GET['module']) && $_GET['module']=='truyen'){
			   ?>


      <div style="height:5px"></div>

		<input type="hidden" name="optionvalue" id="menu-search-box" class="input-medium" data-placeholder="Nhập Tên Truyện ..."   />		
		<div style="height:5px"></div>
        <?php }?>
	
				 <?php }  ?>
				 <div style="height:5px"></div>
                 
                 
